﻿//
// Created: 2018/9/6
// Author: chenqiang
//
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration;
using Model.Util;

namespace Model.Util.Map
{
    internal  class CategoryAttrValuesMap:EntityTypeConfiguration< CategoryAttrValues >    
    {
        public CategoryAttrValuesMap()
        {
             this.ToTable("CategoryAttrValues");
             this.HasKey(i => new { i.AttrValueId });
             this.Property(i => i.AttrValueId).HasColumnName("AttrValueId");                     
             this.Property(i => i.AttrValue).HasColumnName("AttrValue");                     
             this.Property(i => i.Isinput).HasColumnName("Isinput");                     
             this.Property(i => i.AttrName).HasColumnName("AttrName");                     
             this.Property(i => i.AttrDisplayOrder).HasColumnName("AttrDisplayOrder");                     
             this.Property(i => i.AttrShowType).HasColumnName("AttrShowType");                     
             this.Property(i => i.AttrValueDisplayOrder).HasColumnName("AttrValueDisplayOrder");                     
             this.Property(i => i.AttrGroupId).HasColumnName("AttrGroupId");                     
             this.Property(i => i.AttrGroupName).HasColumnName("AttrGroupName");                     
             this.Property(i => i.AttrGroupDisplayOrder).HasColumnName("AttrGroupDisplayOrder");                     
             this.Property(i => i.AttrId).HasColumnName("AttrId");                     
        }   
    }
    
     public static class CategoryAttrValuesMapExtensions
    {
        public static void UserCategoryAttrValuesMap(this DbModelBuilder pModelBuilder)
        {
            pModelBuilder.Configurations.Add(new CategoryAttrValuesMap());
        }
    }
}